package com.b;
 
public class Ponit {
	private double x;
	private double y;
	private double z;
 
	public Ponit() {
	}
 
	public Ponit(double a, double b, double c) {
		x = a;
		y = b;
		z = c;
	}
 
	public double getX() {
		return x;
	}
 
	public void setX(double a) {
		x = a;
	}
 
	public double getY() {
		return y;
	}
 
	public void setY(double b) {
		y = b;
 
	}
 
	public double getZ() {
		return z;
 
	}
 
	public void setZ(double c) {
		z = c;
 
	}
 
	public void count1(Ponit s) {
		double m = Math.sqrt((x - s.x) * (x - s.x) + (y - s.y) * (y - s.y)
				+ (z - s.z) * (z - s.z));
		System.out.println("两点的距离：" + m);
	}
 
	public void count2() {
		double ss = Math.sqrt(x * x + y * y + z * z);
		System.out.println("点到原点的距离：" + ss);
	}
 
	public void print() {
		System.out.println("点的x坐标：" + x + "点的y坐标：" + y + "点的z坐标：" + z);
	}
 
}